﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LX.Data
{
    /// <summary>
    /// 持久化上下文
    /// </summary>
    public interface IPersistentContext:IDisposable
    {
        IQueryable<T> GetQuery<T>() where T : class,IEntity;
        void Add<T>(T model) where T : class,IEntity;
        void Delete<T>(T model) where T : class,IEntity;
        T Get<T>(object id) where T : class,IEntity;
        void Commit();

    }
}
